package com.jungle.design.mode.strategypattern.controller;

import com.jungle.design.mode.strategypattern.entity.vo.PayReqVO;
import com.jungle.design.mode.strategypattern.service.PayService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Jungle
 * @create 2024-09-15 21:45
 */
@RestController
@RequestMapping("/pay")
public class PayController {
    @Resource
    private PayService payService;

    /**
     * 去支付
     */
    @PostMapping("/toPay")
    public void toPay(@RequestBody PayReqVO payReqVO) {
        payService.toPay(payReqVO);
    }
}
